package com.gxa.customer.controller;

import com.gxa.common.commons.R;
import com.gxa.common.params.PrAddParam;
import com.gxa.common.params.QueryPrParam;
import com.gxa.customer.service.PartnerService;
import com.gxa.customer.service.PrService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@RestController
@RequestMapping("/customer/pr")
public class PrController {
    @Autowired
    private PrService prService;

    /**
     * 新增pr
     * @param param
     * @return
     */
    @PostMapping("/AddPr")
    public R AddPr(@RequestBody PrAddParam param){
        return prService.AddPr(param);
    }

    /**
     * 更新pr
     * @param param
     * @return
     */
    @PostMapping("/updatePr")
    public R updatePr(@RequestBody PrAddParam param){
        return prService.updatePr(param);
    }

    /**
     * 删除pr
     * @param id
     * @return
     */
    @PostMapping("/delPr")
    public R delPr(Long id){
        return prService.delPr(id);
    }
    /**
     * 查询pr
     */
    @PostMapping("/queryPr")
    public R queryPr(@RequestBody QueryPrParam param){
        return prService.queryPr(param);
    }
}
